<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><bean:message key="welcome.title"/></title>        
    </head>
    <body style="background-color: white">
<script LANGUAGE="JavaScript">
<!--
// by Nannette Thacker
// http://www.shiningstar.net
// This script checks and unchecks boxes on a form
// Checks and unchecks unlimited number in the group...
// Pass the Checkbox group name...
// call buttons as so:
// <input type=button name="CheckAll"   value="Check All"
	//onClick="checkAll(document.myform.list)">
// <input type=button name="UnCheckAll" value="Uncheck All"
	//onClick="uncheckAll(document.myform.list)">
// -->

<!-- Begin
function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}
//  End -->
</script>
        
      <br><br><br>

        <div align="center" >
            La différence en comptes Etudiants est:
        <br>
        <br>
        La liste des étudiants à ajouter:
        <br>
        <html:form action="Sync/syncDBCompteLdap" >
        <div id="resultsStd" >
            <table>
        <logic:iterate name="listStd" id="compteId">
            <tr>
                <td><html:checkbox property="apogee" value="${compteId.apogee}" ></html:checkbox></td>
	<td><bean:write name="compteId" property="apogee"/></td>
        <td><bean:write name="compteId" property="cne"/></td>
	<td><bean:write name="compteId" property="nom"/></td>
        <td><bean:write name="compteId" property="prenom"/></td>
        <td><bean:write name="compteId" property="etab"/></td>
        <td><html:link action="Sync/editerComteStd.do?apogee=${compteId.apogee}">modifier</html:link></td>
        </tr>
        </logic:iterate>
        </table>
        </div>
        <br>
            La différence en comptes Personnel est:
         <br>
        <div id="resultsPers" >
            <table>
        <logic:iterate name="listPers" id="compte">
            <tr>
	<td><bean:write name="compte" property="som"/></td>
	<td><bean:write name="compte" property="nom"/></td>
        <td><bean:write name="compte" property="prenom"/></td>
        <td><bean:write name="compte" property="etab"/></td>
        </tr>
        </logic:iterate>
        </table>
        </div>
         <div id="resultsPers" >
             <table>
                 <tr>
                     <td><html:button property="checkAll" onclick="checkAll(document.listeAogeeForm.apogee)">sélectionner tout</html:button></td>
                     <td><html:button property="uncheckAll" onclick="uncheckAll(document.listeAogeeForm.apogee)">décocher tout</html:button></td>
                 </tr>
                 <tr>
                     <td><html:submit value="Ajouter les comptes séléctionnées"></html:submit></td>
                 </tr>
             </table>
         </div>

        <br><br>

        </html:form>        
        <br>

        <html:link action="/Sync/menuPrincipalSync.do">Menu principal de synchronisation</html:link>
        <br>

        </div>
        </body>
</html:html>
